package com.ms.banner.transformer;

import ohos.agp.components.Component;

public class DrawerTransformer extends ABaseTransformer {
    @Override
    protected void onTransform(Component component, float position) {
        if (position <= (float)0) {
            component.setTranslationX(0.0F);
        } else if (position <= (float)1) {
            component.setTranslationX((float)(-component.getWidth() / (float)2) * position);
        }
    }
}
